function FindProxyForURL(url, host) {
    if (
        shExpMatch(url,"*.cn/\*")
        || dnsDomainIs(host,"wi.sc")
        || shExpMatch(url,"*192.168.1.*")
        || dnsDomainIs(host,".baidu.com")
        || dnsDomainIs(host,".qq.com")
        || dnsDomainIs(host,".sina.com.cn")
        || dnsDomainIs(host,".taobao.com")
        || dnsDomainIs(host,".163.com")
        || dnsDomainIs(host,".weibo.com")
        || dnsDomainIs(host,".sohu.com")
        || dnsDomainIs(host,".youku.com")
        || dnsDomainIs(host,".soso.com")
        || dnsDomainIs(host,".ifeng.com")
        || dnsDomainIs(host,".tudou.com")
        || dnsDomainIs(host,".chinaz.com")
        || dnsDomainIs(host,".tmall.com")
        || dnsDomainIs(host,".alipay.com")
        || dnsDomainIs(host,".renren.com")
        || dnsDomainIs(host,".cnzz.com")
        || dnsDomainIs(host,".360buy.com")
        || dnsDomainIs(host,".pengyou.com")
        || dnsDomainIs(host,".douban.com")
        || dnsDomainIs(host,".hao123.com")
        || dnsDomainIs(host,".58.com")
        || dnsDomainIs(host,".tianya.cn")
        || dnsDomainIs(host,".sogou.com")
        || dnsDomainIs(host,".ganji.com")
        || dnsDomainIs(host,".zol.com.cn")
        || dnsDomainIs(host,".xinhuanet.com")
        || dnsDomainIs(host,".56.com")
        || dnsDomainIs(host,".qiyi.com")
        || dnsDomainIs(host,".soufun.com")
        || dnsDomainIs(host,".kaixin001.com")
        || dnsDomainIs(host,".xunlei.com")
        || dnsDomainIs(host,".soku.com")
        || dnsDomainIs(host,".youdao.com")
        || dnsDomainIs(host,".51.la")
        || dnsDomainIs(host,".360.cn")
        || dnsDomainIs(host,".people.com.cn")
        || dnsDomainIs(host,".csdn.net")
        || dnsDomainIs(host,".paipai.com")
        || dnsDomainIs(host,".126.com")
        || dnsDomainIs(host,".10086.cn")
        || dnsDomainIs(host,".china.com")
        || dnsDomainIs(host,".homeway.com.cn")
        || dnsDomainIs(host,".mop.com")
        || dnsDomainIs(host,".dianping.com")
        || dnsDomainIs(host,".pconline.com.cn")
        || dnsDomainIs(host,".hudong.com")
        || dnsDomainIs(host,".blog.163.com")
        || dnsDomainIs(host,".51job.com")
        || dnsDomainIs(host,".51.com")
        || dnsDomainIs(host,".baixing.com")
        || dnsDomainIs(host,".aizhan.com")
        || dnsDomainIs(host,".chinanews.com")
        || dnsDomainIs(host,".admin5.com")
        || dnsDomainIs(host,".ku6.com")
        || dnsDomainIs(host,".amazon.cn")
        || dnsDomainIs(host,".4399.com")
        || dnsDomainIs(host,".ynet.com")
        || dnsDomainIs(host,".alimama.com")
        || dnsDomainIs(host,".iloveyouxi.com")
        || dnsDomainIs(host,".huanqiu.com")
        || dnsDomainIs(host,".autohome.com.cn")
        || dnsDomainIs(host,".eastmoney.com")
        || dnsDomainIs(host,".love21cn.com")
        || dnsDomainIs(host,".cntv.cn")
        || dnsDomainIs(host,".dangdang.com")
        || dnsDomainIs(host,".lashou.com")
        || dnsDomainIs(host,".meituan.com")
        || dnsDomainIs(host,".39.net")
        || dnsDomainIs(host,".pchome.net")
        || dnsDomainIs(host,".hc360.com")
        || dnsDomainIs(host,".docin.com")
        || dnsDomainIs(host,".vancl.com")
        || dnsDomainIs(host,".discuz.net")
        || dnsDomainIs(host,".qidian.com")
        || dnsDomainIs(host,".zhaopin.com")
        || dnsDomainIs(host,".qunar.com")
        || dnsDomainIs(host,".tom.com")
        || dnsDomainIs(host,".bitauto.com")
        || dnsDomainIs(host,".wo.com.cn")
        || dnsDomainIs(host,".115.com")
        || dnsDomainIs(host,".verycd.com")
        || dnsDomainIs(host,".duowan.com")
        || dnsDomainIs(host,".yocc.net")
        || dnsDomainIs(host,".xcar.com.cn")
        || dnsDomainIs(host,".www.net.cn")
        || dnsDomainIs(host,".cnblogs.com")
        || dnsDomainIs(host,".focus.cn")
        || dnsDomainIs(host,".pptv.com")
        || dnsDomainIs(host,".19lou.com")
        || dnsDomainIs(host,".makepolo.com")
        || dnsDomainIs(host,".iteye.com")
        || dnsDomainIs(host,".cnbeta.com")
        || dnsDomainIs(host,".icbc.com.cn")
        || dnsDomainIs(host,".17kuxun.com")
        || dnsDomainIs(host,".2345.com")
        || dnsDomainIs(host,".youboy.com")
        || dnsDomainIs(host,".zhubajie.com")
        || dnsDomainIs(host,".letv.com")
        || dnsDomainIs(host,".tuan800.com")
        || dnsDomainIs(host,".weather.com.cn")
        || dnsDomainIs(host,".cmbchina.com")
        || dnsDomainIs(host,".78day.com")
        || dnsDomainIs(host,".arpg2.com")
        || dnsDomainIs(host,".yesky.com")
        || dnsDomainIs(host,".pcpop.com")
        || dnsDomainIs(host,".ctrip.com")
        || dnsDomainIs(host,".17173.com")
        || dnsDomainIs(host,".mtime.com")
        || dnsDomainIs(host,".gougou.com")
        || dnsDomainIs(host,".ads8.com")
        || dnsDomainIs(host,".tenpay.com")
        || dnsDomainIs(host,".onlinedown.net")
        || dnsDomainIs(host,".nipic.com")
        || dnsDomainIs(host,".yiqifa.com")
        || dnsDomainIs(host,".chinabroadcast.cn")
        || dnsDomainIs(host,".enet.com.cn")
        || dnsDomainIs(host,".it168.com")
        || dnsDomainIs(host,".7k7k.com")
        || dnsDomainIs(host,".seowhy.com")
        || dnsDomainIs(host,".skycn.com")
        || dnsDomainIs(host,".xyxy.net")
        || dnsDomainIs(host,".hoopchina.com")
        || dnsDomainIs(host,".ct10000.com")
        || dnsDomainIs(host,".manzuo.com")
        || dnsDomainIs(host,".qq937.com")
        || dnsDomainIs(host,".ccb.com")
        || dnsDomainIs(host,".55tuan.com")
        || dnsDomainIs(host,".178.com")
        || dnsDomainIs(host,".etao.com")
        || dnsDomainIs(host,".linkhelper.cn")
        || dnsDomainIs(host,".52pk.net")
        || dnsDomainIs(host,".xiaomi.com")
        || dnsDomainIs(host,".ip138.com")
        || dnsDomainIs(host,".aibang.com")
        || dnsDomainIs(host,".86mmo.com")
        || dnsDomainIs(host,".onetad.com")
        || dnsDomainIs(host,".jiathis.com")
        || dnsDomainIs(host,".dipan.com")
        || dnsDomainIs(host,".uuu9.com")
        || dnsDomainIs(host,".tiexue.net")
        || dnsDomainIs(host,".twcczhu.com")
        || dnsDomainIs(host,".yihaodian.com")
        || dnsDomainIs(host,".120ask.com")
        || dnsDomainIs(host,".groupon.cn")
        || dnsDomainIs(host,".cqtiyu.com")
        || dnsDomainIs(host,".51cto.com")
        || dnsDomainIs(host,".yoka.com")
        || dnsDomainIs(host,".cnr.cn")
        || dnsDomainIs(host,".6.cn")
        || dnsDomainIs(host,".weiphone.com")
        || dnsDomainIs(host,".china.com.cn")
        || dnsDomainIs(host,".iciba.com")
        || dnsDomainIs(host,".nuomi.com")
        || dnsDomainIs(host,".sdo.com")
        || dnsDomainIs(host,".techweb.com.cn")
        || dnsDomainIs(host,".kdnet.net")
        || dnsDomainIs(host,".shangdu.com")
        || dnsDomainIs(host,".21cn.com")
        || dnsDomainIs(host,".babytree.com")
        || dnsDomainIs(host,".donews.com")
        || dnsDomainIs(host,".chinadaily.com.cn")
        || dnsDomainIs(host,".24quan.com")
        || dnsDomainIs(host,".jrj.com.cn")
        || dnsDomainIs(host,".360doc.com")
        || dnsDomainIs(host,".37see.com")
        || dnsDomainIs(host,".ulink.cc")
        || dnsDomainIs(host,".ci123.com")
        || dnsDomainIs(host,".ce.cn")
        || dnsDomainIs(host,".baomihua.com")
        || dnsDomainIs(host,".1o26.com")
        || dnsDomainIs(host,".xiami.com")
        || dnsDomainIs(host,".rednet.cn")
        || dnsDomainIs(host,".joy.cn")
        || dnsDomainIs(host,".pcauto.com.cn")
        || dnsDomainIs(host,".linezing.com")
        || dnsDomainIs(host,".1717388.com")
        || dnsDomainIs(host,".boc.cn")
        || dnsDomainIs(host,".phpwind.net")
        || dnsDomainIs(host,".27.cn")
        || dnsDomainIs(host,".chinabyte.com")
        || dnsDomainIs(host,".dospy.com")
        || dnsDomainIs(host,".xici.net")
        || dnsDomainIs(host,".95169.com")
        ) {
            return 'DIRECT';
        }
    if (
            shExpMatch(url,"http:*")
            || shExpMatch(url,"*amazon.com*")
            || shExpMatch(url,"*sites.google.com*")
            || shExpMatch(url,"*www.google.com*")
            || shExpMatch(url,"*facebook.com*")
            || shExpMatch(url,"*twitter.com*")
            || shExpMatch(url,"*googleusercontent.com*")
            || dnsDomainIs(host,"appengine.google.com")
       ) {
        return "SOCKS5 127.0.0.1:9060";
    }
    return 'DIRECT';
}
